package com.jcl.recruit.console.api.elastic;

import com.jcl.core.common.page.PageResult;
import com.jcl.core.resp.ApiResponse;
import com.jcl.recruit.console.elastic.logic.service.ConsoleElasticService;
import com.jcl.recruit.elasticsearch.resume.vo.ElasticPageCondition;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName ConsoleResumeController
 * @Author yyliu
 * @Date 2018/12/24 14:49
 * @Version 1.0
 **/
@RestController
@RequestMapping("/console/elastic")
public class ConsoleElasticController {

    @Autowired
    private ConsoleElasticService consoleElasticService;

    @PostMapping("/pageList")
    public ApiResponse pageList(@RequestBody ElasticPageCondition condition) {

        PageResult result = consoleElasticService.pageList(condition);

        return ApiResponse.success(result);
    }

}
